package com.notelapierdas.graficobjects;

import java.util.HashMap;

import com.notelapierdas.R;
import com.notelapierdas.objects.Deal;

public class DealListItem{

	public Deal deal;
	public final static String[] attList = new String[] { "title", "price_deal", "discount" };
	public final static int[] resList = new int[] { R.id.SecondaryDealObject_TextView_title,R.id.SecondaryDealObject_TextView_dealprice,
		R.id.SecondaryDealObject_TextView_discount };
	
	public DealListItem(Deal deal) {	
		this.deal = deal;
	}

	public HashMap<String, String> getMap() {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put(attList[0], deal.getTitle().getShortTitle());
		map.put(attList[1], "$"+String.valueOf(deal.getPrice().getDealPrice()));
		map.put(attList[2], String.valueOf(deal.getPrice().getDiscount())+"%");
		return map;
	}
	
}
